<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
        }

        div {
            /* width: 100px; */
            height: 100px;
            background: darkblue
        }
    </style>
</head>

<body>
    <div id="box1">我是文字我是文字</div>
    <div id="box2"></div>
    <div id="box3"></div>
    <script>
        let boxs = document.getElementsByTagName('div')[0]
        let num = 12
        boxs.onclick = function () {
            setInterval(function () {
                num += 2
                boxs.style.fontSize = num+'px'
            }, 1000)
        }

    </script>
</body>

</html>